﻿package com.obas.type
{
	import com.ease.common.enums.OptionalEnum;
	import com.ease.lang.Enum;
	import com.ease.lang.EnumConstants;
	import com.obas.type.AlignmentType;

	[Bindable]
	[RemoteClass(alias="com.obas.type.AlignmentType")]

	public class AlignmentType extends Enum
	{
		/* static init */
		{ initEnum(AlignmentType); }

		/* Constants */
		public static const Left:AlignmentType = new AlignmentType("Left", 1, "左端对齐");
		public static const Right:AlignmentType = new AlignmentType("Right", 2, "右端对齐");
		public static const Top:AlignmentType = new AlignmentType("Top", 3, "顶端对齐");
		public static const Bottom:AlignmentType = new AlignmentType("Bottom", 4, "低端对齐");
		public static const Center:AlignmentType = new AlignmentType("Center", 5, "中间对齐");

		private var _value:int;
		private var _text:String;

		/*public*/ function AlignmentType(name:String=null ,value:int=0 ,text:String=null) {
			super.name = name;
			this._value = value;
			this._text = text;
		}

		public function get value():int  { return this._value; }
		public function get text():String  { return this._text; }

		/* constant query */
		public static function getEnumConstants():Array {
			return Enum.getEnumConstants(AlignmentType);
		}

		public static function get(constantName:String, caseSensitive:Boolean = false):AlignmentType {
			return AlignmentType(Enum.get(AlignmentType, constantName, caseSensitive));
		}
	}
}